#include <bits/stdc++.h>

using namespace std;
int n;

const int N = 10010;
int d1[N], d2[N], p1[N], up[N];
bool is_leave[N];

int dfs_d(vector<list<pair<int, int>>>& adj_list, int u, int father)
{
}
int main()
{
    vector<list<pair<int, int>>> adj_list;
    cin >> n;
    adj_list.resize(n + 1);
    for (int i = 0; i < n - 1; i++)
    {
        int a, b, c;
        adj_list[a].push_front({b, c});
        adj_list[b].push_front({a, c});
    }
    return 0;
}